home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Tracker Coordinates
- Sent: 6/6/96 10:24 AM
- Received: 6/6/96 10:41 AM
- From: Bill Finzer, bfinzer@mail.keypress.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Subject: RE>>Tracker Coordinates Time: 10:25 AM Date:6/6/96
-
- > >As near as I can tell, the FW_CTracker::Track method is inconsistent in
- terms
- > >of the mouse coordinates it passes in its call to BeginTracking and then
- to
- > >ContinueTracking.
- > >
- > >In BeginTracking, the point passed in is in view _content_ coordinates.
- > >Whereas in ContinueTracking the current location point passed in is in
- view
- > >coordinates.
- > >
- > >Shouldn't both of them be in view coordinates?
- >
- > I looked at the code and both are in view content coordinates.
- > BeginTracking is called with the a point converted using
- > FrameToViewContent. The point passed to ContinueTracking is also in view
- > Content coordinates. FW_GetMouseLocation calls ::GetMouse and then
- > converts the point to the logical coordinates of the current graphic
- > context (theGC.DeviceToLogical(..)). In this case the view content
- > coordinates.
- >
- > FW_CTracker::Track is used in both ODFDraw and ODFContainer which are
- > both supporting scrolling. If there was a bug, the tracker would not be
- > working correctly in a scrolled view.
- >
- > ........................................................................
- > Henri Lamiraux lamiraux@apple.com
- > Apple Computer, Inc. OpenDoc(tm) Development Framework
- > ........................................................................
-
- Well then perhaps my problem has to do with the difference between view
- coordinates and view _content_ coordinates.
-
- My situation is that I have a content view whose coordinates are the same as
- the frame. I have a subview of the content view located at (say) (20, 200,
- 200, 220) in view content coordinates. I click the mouse near the left top of
- this subview. What I observe in the debugger is that in BeginTracking,
- anchorPoint is about (25, 205) but that the currentPoint passed in to
- ContinueTracking is (5, 5).
-
- When I trace theGC.DeviceToLogical(..) it _does_ seem to convert to _view_
- coordinates as opposed to view _content_ coordinates.
-
- Am I confused, or what?
-
- Thanks,
- Bill Finzer
-